<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>File: loading.rb</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



  <div id="fileHeader">
    <h1>loading.rb</h1>
    <table class="header-table">
    <tr class="top-aligned-row">
      <td><strong>Path:</strong></td>
      <td>loading.rb
      </td>
    </tr>
    <tr class="top-aligned-row">
      <td><strong>Last Update:</strong></td>
      <td>Thu Jun 21 20:00:25 India Standard Time 2007</td>
    </tr>
    </table>
  </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
This method reads the config file for the loading process.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000040">entry_method_for_process_to_start</a>&nbsp;&nbsp;
      <a href="#M000046">execute_loading</a>&nbsp;&nbsp;
      <a href="#M000038">get_csv_file_list</a>&nbsp;&nbsp;
      <a href="#M000039">get_number_of_columns_for_csv_file</a>&nbsp;&nbsp;
      <a href="#M000042">get_table_header_for_csv</a>&nbsp;&nbsp;
      <a href="#M000044">load_csv_to_table</a>&nbsp;&nbsp;
      <a href="#M000037">read_load_file</a>&nbsp;&nbsp;
      <a href="#M000041">set_blank_values_as_nil</a>&nbsp;&nbsp;
      <a href="#M000043">structure_file_exists</a>&nbsp;&nbsp;
      <a href="#M000045">table_already_exists</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000040" class="method-detail">
        <a name="M000040"></a>

        <div class="method-heading">
          <a href="loading_rb.src/M000040.html" target="Code" class="method-signature"
            onclick="popupCode('loading_rb.src/M000040.html');return false;">
          <span class="method-name">entry_method_for_process_to_start</span><span class="method-args">(filename)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This is main method of data loading. This method decided if the loading is
to be done for a single CSV file or multiple.
</p>
        </div>
      </div>

      <div id="method-M000046" class="method-detail">
        <a name="M000046"></a>

        <div class="method-heading">
          <a href="loading_rb.src/M000046.html" target="Code" class="method-signature"
            onclick="popupCode('loading_rb.src/M000046.html');return false;">
          <span class="method-name">execute_loading</span><span class="method-args">(filename,new_conn)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>

      <div id="method-M000038" class="method-detail">
        <a name="M000038"></a>

        <div class="method-heading">
          <a href="loading_rb.src/M000038.html" target="Code" class="method-signature"
            onclick="popupCode('loading_rb.src/M000038.html');return false;">
          <span class="method-name">get_csv_file_list</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method returns the CSV files which are to be loaded into the table.
</p>
        </div>
      </div>

      <div id="method-M000039" class="method-detail">
        <a name="M000039"></a>

        <div class="method-heading">
          <a href="loading_rb.src/M000039.html" target="Code" class="method-signature"
            onclick="popupCode('loading_rb.src/M000039.html');return false;">
          <span class="method-name">get_number_of_columns_for_csv_file</span><span class="method-args">(filename)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method checks the number of columns in a CSV file. This will be used
while creating the dummy_headers.
</p>
        </div>
      </div>

      <div id="method-M000042" class="method-detail">
        <a name="M000042"></a>

        <div class="method-heading">
          <a href="loading_rb.src/M000042.html" target="Code" class="method-signature"
            onclick="popupCode('loading_rb.src/M000042.html');return false;">
          <span class="method-name">get_table_header_for_csv</span><span class="method-args">(filename)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method has been now updated so that it can allow the creation of the
tables without the preexisting the header files.
</p>
        </div>
      </div>

      <div id="method-M000044" class="method-detail">
        <a name="M000044"></a>

        <div class="method-heading">
          <a href="loading_rb.src/M000044.html" target="Code" class="method-signature"
            onclick="popupCode('loading_rb.src/M000044.html');return false;">
          <span class="method-name">load_csv_to_table</span><span class="method-args">(filename)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This is the actual load method which will be load the data to the table.
</p>
        </div>
      </div>

      <div id="method-M000037" class="method-detail">
        <a name="M000037"></a>

        <div class="method-heading">
          <a href="loading_rb.src/M000037.html" target="Code" class="method-signature"
            onclick="popupCode('loading_rb.src/M000037.html');return false;">
          <span class="method-name">read_load_file</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method reads the config file for the loading process.
</p>
        </div>
      </div>

      <div id="method-M000041" class="method-detail">
        <a name="M000041"></a>

        <div class="method-heading">
          <a href="loading_rb.src/M000041.html" target="Code" class="method-signature"
            onclick="popupCode('loading_rb.src/M000041.html');return false;">
          <span class="method-name">set_blank_values_as_nil</span><span class="method-args">(filename)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method sets all the empty values as nil so as to simplify the loading
process.
</p>
        </div>
      </div>

      <div id="method-M000043" class="method-detail">
        <a name="M000043"></a>

        <div class="method-heading">
          <a href="loading_rb.src/M000043.html" target="Code" class="method-signature"
            onclick="popupCode('loading_rb.src/M000043.html');return false;">
          <span class="method-name">structure_file_exists</span><span class="method-args">(table_name)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
This method checks if there is already a predefined structure file for the
table.
</p>
        </div>
      </div>

      <div id="method-M000045" class="method-detail">
        <a name="M000045"></a>

        <div class="method-heading">
          <a href="loading_rb.src/M000045.html" target="Code" class="method-signature"
            onclick="popupCode('loading_rb.src/M000045.html');return false;">
          <span class="method-name">table_already_exists</span><span class="method-args">(new_conn,tablename)</span>
          </a>
        </div>
      
        <div class="method-description">
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>